<?php
function classToOrm($class = NULL) {
  $class = strtolower($class);
  switch ($class) {
    case 'pz_menu':
      require_once dirname(__FILE__) . '/ORMpz_menu.class.php';
      return new ORMpz_menu();
    case 'pz_page':
      require_once dirname(__FILE__) . '/ORMpz_page.class.php';
      return new ORMpz_page();
    case 'pz_plugin':
      require_once dirname(__FILE__) . '/ORMpz_plugin.class.php';
      return new ORMpz_plugin();
    case 'pz_plugin_instance':
      require_once dirname(__FILE__) . '/ORMpz_plugin_instance.class.php';
      return new ORMpz_plugin_instance();
    case 'pz_profile':
      require_once dirname(__FILE__) . '/ORMpz_profile.class.php';
      return new ORMpz_profile();
    case 'pz_theme':
      require_once dirname(__FILE__) . '/ORMpz_theme.class.php';
      return new ORMpz_theme();
    default:
      return NULL;
  }
  return NULL;
}
?>
